<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" lang="en" th:with="unixstamp=${#dates.createNow().time}">
<head th:replace="common::header"></head>
<style type="text/css">
    {# 设置table每一行的height #}
    .layui-table-cell {
        height: auto;
        line-height: 28px;
    }
</style>
<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header t-title layui-bg-cyan mlk-title">系统轮播图管理</div>
					<div class="layui-card-body">
						<table class="layui-table" id="table" lay-filter="table" style="height:100%;"></table>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

<!--新增轮播信息-->
<div id="addLayer" style="display: none">
    <form class="layui-form layui-form-pane" lay-filter="addForm" id="addForm" enctype="multipart/form-data">
        <div class="layui-form-item" pane>
            <label class="layui-form-label">轮播图名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" required  lay-verify="required" placeholder="请输入轮播图名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">展示顺序</label>
            <div class="layui-input-block">
                <input type="text" name="seq" required  lay-verify="required" placeholder="请输入展示顺序" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">轮播图类别</label>
            <div class="layui-input-block">
                <select name="type" lay-verify="required">
                    <option value="1">废品回收轮播图</option>
                    <option value="2">积分商城轮播图</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item" pane>
            <button type="button" class="layui-btn layui-btn-normal" id="fileupload">
                <i class="layui-icon">&#xe67c;</i>上传图片
            </button>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button  class="layui-btn layui-btn-normal" lay-submit lay-filter="submit" id="submit">立即提交</button>
                <input type="reset" id="reset" class="layui-btn layui-btn-primary mlk-hide" style="display: none;"></input>
            </div>
        </div>
    </form>
</div>
<script type="text/html" id="toolbar">
    <a class="layui-btn layui-btn-md layui-btn-normal" lay-event="addBanner">新增轮播图</a>
</script>
<script type="text/html" id="tool">
    {{#  if(d.status == 0 ){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="up">上线</a>
    {{#  } }}
    {{#  if(d.status == 1 ){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="down">下线</a>
    {{#  } }}
</script>
<div th:include="common::footer"></div>
<script type="text/javascript" th:src="@{/plugin/ajax/ajaxfileupload.js}"></script>
<script type="text/javascript" th:src="@{/js/engSystem/banner.js}"></script>
</html>